package tests;

import static org.junit.Assert.*;
import game.Player;

import org.junit.Test;

public class PlayerTest {

	@Test
	public void testCreatePlayer() {
		Player aPlayer = new Player("Player1");
		
		assertEquals("Player1", aPlayer.getPlayerName());
	}
	
	@Test
	public void testCreatePlayerAndItHas0Points() {
		Player aPlayer = new Player("Player1");
		
		assertEquals(0, aPlayer.getAccumulatedPoints());
	}
	
	@Test
	public void testAcumulateSomePoints()
	{
		Player aPlayer = new Player("Player1");
		
		aPlayer.accumulate(110);		
		assertEquals(110, aPlayer.getAccumulatedPoints());
	}
	
	@Test
	public void testAcumulateSomePointsTwoTimes()
	{
		Player aPlayer = new Player("Player1");
		
		aPlayer.accumulate(110);
		aPlayer.accumulate(200);
		assertEquals(310, aPlayer.getAccumulatedPoints());
	}

}
